package com.ship.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 部门
 * @author wqf
 * @version  Nov 24, 2011 9:48:59 AM
 */
@Entity
@org.hibernate.annotations.Entity(
		selectBeforeUpdate = true, 
		dynamicInsert = true, 
		dynamicUpdate = true
)
@Table(name="ship_dept")
public class Dept implements Serializable {

	private static final long serialVersionUID = -4368426096340185437L;
	@Id
	@GeneratedValue
	private Long id;
	
	/**
	 * 部门名称
	 */
	@Column
	private String deptName;
	
	/**
	 * 备注
	 */
	@Column
	private String remark;
		
	
	@OneToMany(cascade = CascadeType.ALL,mappedBy="dept",fetch=FetchType.LAZY)
	private List<User> userList=new ArrayList<User>();
	

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

}
